package com.it.dao;

import java.sql.DriverManager;
import com.mysql.jdbc.Connection;

public class Dbutils {

	public static Connection getConnection() {
		Connection conn = null;
		try {
			Class.forName("com.mysql.jdbc.Driver");
			String url = "jdbc:mysql://localhost:3306/db_message";
			String username = "root";
			String password = "1234";
			conn = (Connection) DriverManager.getConnection(url, username, password);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return conn;
	}

}
